home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
com
/
computer
/
casio_st
/
prog_fx
/
divers
/
robotiqu.sha
< prev
next >
Wrap
Text File
|
1994-03-01
|
2KB
|
81 lines
10 PRINT "ROBOTIQUE"
15 MODE 5
20 CLEAR:DIM A$(4,4),B(4,4),C$(4):P=PI
50 INPUT "Teta(k-1) ",C$(1):IF C$(1)="" THEN C$(1)="0"
60 INPUT "h(k-1) ",C$(2):IF C$(2)="" THEN C$(2)="0"
70 INPUT "Z(k) ",C$(3):IF C$(3)="" THEN C$(3)="0"
80 INPUT "Gamma(k) ",C$(4):IF C$(4)="" THEN C$(4)="0"
100 A$(1,3)="0":B(1,3)=1
110 A$(4,1)="0":B(4,1)=1
120 A$(4,2)="0":B(4,2)=1
130 A$(4,3)="0":B(4,3)=1
140 A$(4,4)="1":B(4,4)=1
150 A$(2,3)="1":B(2,3)=1
160 A$(3,3)="1":B(3,3)=1
1000 $=C$(2)
1010 IF MID$(1,1)="-" THEN 1100
1015 IF MID$(1,1)<>"0" THEN 1100
1030 A$(1,4)="0":B(1,4)=1
1040 GOTO 2000
1100 A$(1,4)=$:B(1,4)=0
2000 $=C$(4)
2010 IF MID$(1,1)="-" THEN 2450
2020 IF MID$(1,1)="P" THEN 2420
2030 IF MID$(1,1)="0" THEN 2500
2100 $=MID$(2,1)
2110 A$(1,1)="C"+$:B(1,1)=0
2120 A$(1,2)="-S"+$:B(1,2)=0
2130 A$(2,1)="S"+$:B(2,1)=0
2140 A$(2,2)="C"+$:B(2,2)=0
2150 A$(3,1)="S"+$:B(3,1)=0
2160 A$(3,2)="C"+$:B(3,2)=0
2200 GOTO 3000
2420 D$=MID$(3):C=PI/VALF(D$):GOTO 2505
2450 D$=MID$(4):C=-PI/VALF(D$):GOTO 2505
2500 C=VALF($)
2505 S=SINC:C=COSC
2510 A$(1,1)=STR$(C):B(1,1)=1
2520 A$(1,2)=STR$(-S):B(1,2)=1
2530 A$(3,1)=STR$(S):B(2,1)=1
2540 A$(2,2)=STR$(C):B(2,2)=1
2550 A$(3,1)=STR$(S):B(3,1)=1
2560 A$(3,2)=STR$(C):B(3,2)=1
3000 $=C$(3)
3010 IF MID$(1,1)="-" THEN 3100
3015 IF MID$(1,1)<>"0" THEN 3100
3030 A$(2,4)="0":B(2,4)=1
3035 A$(3,4)="0":B(3,4)=1
3040 GOTO 4000
3100 A$(2,4)=$:B(2,4)=0
3105 A$(3,4)=$:B(3,4)=0
4000 $=C$(1)
4100 IF MID$(1,1)="P" THEN 4120
4110 IF MID$(1,1)="-" THEN 4150
4115 GOTO 4500
4120 D$=MID$(3):C=PI/VALF(D$):GOTO 5000
4150 D$=MID$(4):C=-PI/VALF(D$):GOTO 5000
4500 C=VALF($)
5000 S=SINC:C=COSC
6000 FOR I=2 TO 3:FOR J=1 TO 4:P$=A$(I,J)
7000 IF I=3 THEN 7500
7010 IF J<=2 THEN V=C:GOTO 7990
7030 V=-S:GOTO 7990
7500 IF J<=2 THEN V=S:GOTO 7990
7530 V=C
7990 GOSUB 9000
7992 A$(I,J)=$
7995 NEXT J:NEXT I
7999 GOSUB 8000:END
8000 FOR I=1 TO 4
8010 PRINT I;"[";:FOR J=1 TO 4:PRINT A$(I,J);" ";:NEXT J
8020 PRINT "]":NEXT I:RETURN
9000 IF B(I,J)=0 THEN 9500
9020 IF P$="" THEN P$="0"
9021 Z=VALF(P$):Z=Z*V:$=STR$(Z):RETURN
9500 IF V=1 THEN $=P$:RETURN
9510 IF V=0 THEN $="0":RETURN
9560 $=P$
9570 IF MID$(1,1)="-" THEN 9700
9580 $="-"+$:RETURN
9700 $=MID$(2):RETURN